<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>
        计算属性监听 ios kvo obser listener notify-flutter 安卓广播eventbus
    </title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>

    <div id="root">
        <h1>计算属性监听 ios kvo obser listener notify-flutter 安卓广播eventbus</h1>
        姓：<input type="text" v-model="firstName">
        <br> </br>
        名：<input type="text" v-model="lastName">
        <br> </br>
        <!-- 姓名：<span>{{firstName.slice(0,3)}}-{{lastName}}</span> -->
        姓名：<span>{{fullname()}}</span>
    </div>
</body>

<script type="text/javascript">
    Vue.config.productionTip = false
    new Vue({
        el: '#root',
        data() {
            return {
                firstName:'张',
                lastName:'三'
            }
        },
        methods: {
            fullname(){
                return this.firstName.slice(0,3) + '-' + this.lastName
            }
        },
    })
</script>

</html>